from django.shortcuts import render
from django.core.mail import send_mail
from django.conf import settings
from django.shortcuts import loader
from django.http import HttpResponse
from uuid import uuid4


# Create your views here.
def send_email(request):
    subject = '激活'
    from_email = settings.EMAIL_HOST_USER
    recipient_list = ['fengzhilaoling@163.com']
    data = {
        'user': 'fengling',
    }
    html_message = loader.get_template('myapp/email.html').render(data)

    send_mail(subject=subject, message='aa', recipient_list=recipient_list, html_message=html_message, from_email=from_email)
    return HttpResponse('发送成功！')
